package praktikum_1_ylesanded.ylesanne_3;

import praktikum_1_ylesanded.MathHelper;

import java.util.HashMap;

/**
 * Created by IntelliJ IDEA.
 * User: Jaan Sepp
 * Date: 22.09.11
 * Time: 15:41
 * To change this template use File | Settings | File Templates.
 */
public class Ylesanne_3 {
  public static void main(String[] args) {

    MathHelper mathHelper = new MathHelper();

//    Calculate biggest number that can be calculated with current pc.
//    HashMap<String, Integer> numberInfo = new HashMap<String, Integer>(mathHelper.getFibonacciNumbersRecursivelyWithTime(10000));
//    System.out.println("The biggest fibonacci number your PC can calculate in 10 seconds is: "
//    + numberInfo.get("number") + "[" + numberInfo.get("time") / 1000 + "s].");

    //Calculate how much it would take to calculate 400-th Fibonacci number on your computer.
    HashMap<String, Integer> numberInfoOneSecond = new HashMap<String, Integer>(mathHelper.getFibonacciNumbersRecursivelyWithTime(1000));
    Double fibonacci400 = mathHelper.getFibonacci400(numberInfoOneSecond.get("number"), numberInfoOneSecond.get("time"));
    System.out.println("Number of years it would take to calculate fibonacci number 400 on this PC: " + fibonacci400);
  }

}
